package cn.restcloud.springboot.init;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 用来做基准性能测试的Servlet类
 * @author Thinkpad
 *
 */
public class TestPerformanceServlet  extends HttpServlet{
	private static final long serialVersionUID = 1L;

	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String jsonStr1k="{\r\n" + 
				"  \"state\": true,\r\n" + 
				"  \"pageNo\": 1,\r\n" + 
				"  \"totalPages\": 1,\r\n" + 
				"  \"pageSize\": 15,\r\n" + 
				"  \"total\": 4,\r\n" + 
				"  \"isHavePrePage\": false,\r\n" + 
				"  \"isHaveNextPage\": false,\r\n" + 
				"  \"customArgs\": \"\",\r\n" + 
				"  \"rows\": [\r\n" + 
				"    {\r\n" + 
				"      \"gatewayAppId\": \"demo\",\r\n" + 
				"      \"gatewayAppName\": \"Gateway Demo\",\r\n" + 
				"      \"id\": \"5ca45db36761ef5f524ab55f\",\r\n" + 
				"      \"appId\": \"core\",\r\n" + 
				"      \"createTime\": \"2019-04-03 15:16:03\",\r\n" + 
				"      \"creator\": \"admin\",\r\n" + 
				"      \"creatorName\": \"admin\",      \"editTime\": \"2019-06-20 23:21:44\",\r\n" + 
				"      \"editor\": \"admin\",\r\n" + 
				"      \"editorName\": \"admin\"\r\n" + 
				"    },\r\n" + 
				"    {\r\n" + 
				"      \"gatewayAppId\": \"1000002\",\r\n" + 
				"      \"gatewayAppName\": \"Weixin Application\",\r\n" + 
				"      \"remark\": \"Weixin Application Remark\",\r\n" + 
				"      \"id\": \"5b796533d8e9320e6c0da42a\",\r\n" + 
				"      \"appId\": \"core\",\r\n" + 
				"      \"createTime\": \"2018-08-19 20:40:19\",\r\n" + 
				"      \"creator\": \"admin\",\r\n" + 
				"      \"creatorName\": \"admin\",\r\n" + 
				"      \"editTime\": \"2019-06-20 23:21:47\",\r\n" + 
				"      \"editor\": \"admin\",\r\n" + 
				"      \"editorName\": \"admin\"\r\n" + 
				"    },\r\n" + 
				"    {\r\n" + 
				"      \"gatewayAppId\": \"bsys\",\r\n" + 
				"      \"gatewayAppName\": \"Buiness System\",\r\n" + 
				"      \"id\": \"5b78ddfed8e93244bc06148d\",\r\n" + 
				"      \"appId\": \"gateway\",\r\n" + 
				"      \"createTime\": \"2018-08-19 11:03:26\",\r\n" + 
				"      \"creator\": \"admin\",\r\n" + 
				"      \"creatorName\": \"admin\",\r\n" + 
				"      \"editTime\": \"2019-03-05 21:51:17\",\r\n" + 
				"      \"editor\": \"admin\",\r\n" + 
				"      \"editorName\": \"admin\"\r\n" + 
				"    },\r\n" + 
				"    {\r\n" + 
				"      \"gatewayAppId\": \"aliyun\",\r\n" + 
				"      \"gatewayAppName\": \"ERP System\",\r\n" + 
				"      \"id\": \"5b78dbded8e9323cdc2cdc91\",\r\n" + 
				"      \"appId\": \"gateway\",\r\n" + 
				"      \"createTime\": \"2018-08-19 10:54:22\",\r\n" + 
				"      \"creator\": \"admin\",\r\n" + 
				"      \"creatorName\": \"admin\",\r\n" + 
				"      \"editTime\": \"2018-08-19 10:54:22\",\r\n" + 
				"      \"editor\": \"admin\",\r\n" + 
				"      \"editorName\": \"admin\"\r\n" + 
				"    }\r\n,{\r\n" + 
				"      \"gatewayAppId\": \"restapi\",\r\n" + 
				"      \"gatewayAppName\": \"API System\",\r\n" + 
				"      \"id\": \"5b78dbded8e9323cdc2cdc00\",\r\n" + 
				"      \"appId\": \"gateway\",\r\n" + 
				"      \"createTime\": \"2018-08-19 10:54:22\",\r\n" + 
				"      \"creator\": \"admin\",\r\n" + 
				"      \"creatorName\": \"admin\",\r\n" + 
				"      \"editTime\": \"2018-08-19 10:54:22\",\r\n" + 
				"      \"editor\": \"admin\",\r\n" + 
				"      \"editorName\": \"admin\"\r\n" + 
				"    }\r\n,{\r\n" + 
				"      \"gatewayAppId\": \"1000001\",\r\n" + 
				"      \"gatewayAppName\": \"DingDing Application\",\r\n" + 
				"      \"remark\": \"DingDing Application Remark\",\r\n" + 
				"      \"id\": \"5b796533d8e9320e6c0da000\",\r\n" + 
				"      \"appId\": \"core\",\r\n" + 
				"      \"createTime\": \"2018-02-19 20:40:19\",\r\n" + 
				"      \"creator\": \"admin\",\r\n" + 
				"      \"creatorName\": \"admin\",\r\n" + 
				"      \"editTime\": \"2020-01-20 23:21:47\",\r\n" + 
				"      \"editor\": \"admin\",\r\n" + 
				"      \"editorName\": \"admin\"\r\n" + 
				"    }" + 
				"  ]\r\n" + 
				"}";
		response.getWriter().println(jsonStr1k);
	}
	
}
